from flask import Flask
from flask_cors import *
from admin import admin
from calculate import calculate

app = Flask(__name__, static_folder='static')

app.register_blueprint(admin, url_prefix='/admin')
app.register_blueprint(calculate, url_prefix='/measure')

# 跨域访问配置
CORS(app, supports_credentials=True)


@app.route('/')
def hello_world():
    return 'Hello World!'


if __name__ == '__main__':
    app.run(debug=True)
